package com.jiangyao.model.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.List;

@Data
@ApiModel(value = "收藏与点赞")
public class CollectDto implements BaseDTO  {

    /**
     * 收藏类型 1-职位 2-课堂课件
     */
    @ApiModelProperty(value = "类型 1-职位 2-课堂课件 3-组织" ,example = "1",notes = "收藏或取消时不能传空")
    @NotNull(message = "类型不能为空", groups = {Add.class,Edit.class})
    private Integer type;
    /**
     * 动作类型 1-收藏 2-点赞
     */
    @ApiModelProperty(value = "动作类型 1-收藏 2-点赞" ,example = "1",notes = "收藏或取消时不能为空")
    @NotNull(message = "动作类型不能为空", groups = {Add.class,Edit.class})
    private Integer action;
    /**
     * 关联ID 类型为职位时是jobId，类型为课堂课件时是coursewareId
     */
    @ApiModelProperty(value = "关联ID-课件传：chcoId，职位传：jobId",notes = "收藏或取消时不能为空")
    @NotNull(message = "关联ID不能为空", groups = {Add.class,Edit.class})
    private Integer relateId;
    /**
     * 学期课程ID
     */
    @ApiModelProperty(value = "学期课程ID -课件传：clsubId",notes = "收藏或取消 课件 时不能为空")
    private Integer clsubId;

    /**
     * 成员ID
     */
    @ApiModelProperty(value = "成员ID",hidden = true)
    private Integer userId;
    /**
     * 当前用户ID
     */
    @ApiModelProperty(value = "当前用户ID",hidden = true)
    private Integer currentUserId;

    @ApiModelProperty(value = "关联ID列表",hidden = true)
    private List<Integer> relateIdList;

    public CollectDto(){

    }

    public CollectDto(Integer type, Integer currentUserId,Integer relateId, List<Integer> relateIdList) {
        this.type = type;
        this.relateId = relateId;
        this.currentUserId = currentUserId;
        this.relateIdList = relateIdList;
    }
}
